/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DTO;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Date;

/**
 *
 * @author Pham
 */
public class DTOUser {
    int userId;
    String userName;
    String password;
    String role;
    String userFullName;
    String userAddress;
    String userEmail;
    String userPhone;
    String userGender;
    Date userDateCreated;
    int userActived;
    
    //accessor
    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getRole() {
        return role;
    }

    public void setRole(String role) {
        this.role = role;
    }

    public String getUserFullName() {
        return userFullName;
    }

    public void setUserFullName(String userFullName) {
        this.userFullName = userFullName;
    }

    public String getUserAddress() {
        return userAddress;
    }

    public void setUserAddress(String userAddress) {
        this.userAddress = userAddress;
    }

    public String getUserEmail() {
        return userEmail;
    }

    public void setUserEmail(String userEmail) {
        this.userEmail = userEmail;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getUserGender() {
        return userGender;
    }

    public void setUserGender(String userGender) {
        this.userGender = userGender;
    }

    public Date getUserDateCreated() {
        return userDateCreated;
    }

    public void setUserDateCreated(Date userDateCreated) {
        this.userDateCreated = userDateCreated;
    }

    public int getUserActived() {
        return userActived;
    }

    public void setUserActived(int userActived) {
        this.userActived = userActived;
    }
    
    
    //constructor
    public DTOUser() {
    }
    
    public DTOUser(ResultSet rs) throws SQLException
    {
        this.userId = rs.getInt("user_id");
        this.userName = rs.getString("username");
        this.password = rs.getString("password");
        this.role = rs.getString("user_role");
        this.userFullName = rs.getString("user_fullname");
        this.userAddress = rs.getString("user_address");
        this.userEmail = rs.getString("user_email");
        this.userPhone = rs.getString("user_phone");
        this.userGender = rs.getString("user_gender");
        this.userDateCreated = rs.getDate("user_datecreate");
        this.userActived = rs.getInt("user_actived");
    }

    public DTOUser(String userName, String password, String role, String userFullName, String userAddress, String userEmail, String userPhone, String userGender, Date userDateCreated, int userActived) {
        this.userName = userName;
        this.password = password;
        this.role = role;
        this.userFullName = userFullName;
        this.userAddress = userAddress;
        this.userEmail = userEmail;
        this.userPhone = userPhone;
        this.userGender = userGender;
        this.userDateCreated = userDateCreated;
        this.userActived = userActived;
    }
    
    
}
